﻿using Sustainalytics.Portfolios.BL;
using Sustainalytics.Portfolios.BL.Model;
using Sustainalytics.Portfolios.Service;
using System;
using System.Web.Http;
using Xunit;

namespace Sustainalytics.Portfolios.Tests
{
    public class PortfolioReadHandlerTests
    {
        [Fact]
        [Trait("Owner", "Mihai Stanescu")]
        public void GetPortfolios()
        {
            var config = new HttpConfiguration();
            var container = PortfolioCompositionRoot.RegisterAsync(config);
            var portfoliosReadHandler = container.GetInstance<PortfolioReadHandler>();

            var filter = new PortfolioFilter
            {
                AccountId = Guid.Parse("5d2aee53-87c2-e411-a90b-d89d676410ec"),
                AddedByUserId = Guid.Parse("b96a92aa-bfcd-e411-8883-f0921c109468"),
                IsMyPortfolio = true,
                PortfolioType = PortfolioTypes.Custom,
                SharingStatus = Entities.PortfolioSharingStatus.Private
            };

            var portfolios = portfoliosReadHandler.GetPortfolios(filter, 0, 20, new string[] { "AddedByUserName" }, true);



        }
    }
}
